package com.xin.di.uav.common.enums;

public enum CouponUserTypeEnum {
    ALL_USER("全部用户", (byte) 0),
    NEW_USER("新用户", (byte) 1);
    private String desc;
    private Byte value;

    public Byte getValue() {
        return value;
    }

    public void setValue(Byte value) {
        this.value = value;
    }

    CouponUserTypeEnum(String desc, Byte value) {
        this.desc = desc;
        this.value = value;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static String getDesc(Byte value) {
        for (CouponUserTypeEnum ele : values()) {
            if (ele.getValue().equals(value)) {
                return ele.getDesc();
            }
        }
        return null;
    }
}
